<extend name="Public:User/base"/>
<block name="content">
    <div class="all-width my-cols-right info-back-color back-margin-padding col-sm-9 col-lg-9">
        <div class="row">
            <div class="small-search col-sm-12 col-lg-12">
                <!-- row-search start -->
                <div class="row">
                    <div class="small-search-a col-sm-4 col-lg-4 text-center">
                        <a class="collect-btn" style="color: RGB(244,166,36)" id="bingo-bag" href="#我的拼购券">我的拼购券</a>
                        <a class="collect-btn" id="lucky-bag" href="#我的代金券">我的代金券</a>
                    </div>
                    <div class="col-sm-4 col-lg-4"></div><!--搜索框表单-->
                </div>
                <!--row-search end-->
            </div>
        </div>
    <!-- todo:标题和table的上边框应该重合 -->
        <div id="bingobag">
            <!-- 拼购券数量 start -->
            <div class="row" style="padding: 25px 65px 0 65px;">
                <div class="col-sm-4 col-lg-4" style="border:none; margin-top: 40px;">
                    <h4>拥有拼购券</h4>
                </div>
                <div class="col-sm-offset-4 col-lg-offset-4 col-sm-4 col-lg-4 h5">
                    拼购券总数：<span style="color: RGB(244,166,36)">{$number['oneNumber']+$number['twoNumber']+$number['fiveNumber']+$number['tenNumber']}</span>张<br><br>
                    共计：<span style="color: RGB(244,166,36);">￥{$number['oneNumber']*1+$number['twoNumber']*2+$number['fiveNumber']*5+$number['tenNumber']*10}</span>
                </div>
            </div>
            <div class="row" style="padding: 0 65px;">
                <div class="" style=" width: auto; border:none;">
                    <table class="table table-hover text-center" style="margin-bottom: 0;">
                        <thead>
                        <tr>
                            <td>金额（元）</td>
                            <td>数量（张）</td>
                            <td>小计（元）</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>￥1.00</td>
                            <td><span>{$number.oneNumber}</span></td>
                            <td><span>{$number['oneNumber']*1}</span></td>
                        </tr>
                        <tr>
                            <td>￥2.00</td>
                            <td><span>{$number.twoNumber}</span></td>
                            <td><span>{$number['twoNumber']*2}</span></td>
                        </tr>
                        <tr>
                            <td>￥5.00</td>
                            <td><span>{$number.fiveNumber}</span></td>
                            <td><span>{$number['fiveNumber']*5}</span></td>
                        </tr>
                        <tr>
                            <td>￥10.00</td>
                            <td><span>{$number.tenNumber}</span></td>
                            <td><span>{$number['tenNumber']*10}</span></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- 拼购券数量 end -->
            <br><br><br>
            <!-- 拼购券获得历史 start -->
            <div class="row" style="padding: 25px 65px 0 65px;">
                <div class="col-sm-4 col-lg-4" style="">
                    <h4>拼购券获得历史</h4>
                </div>
            </div>
            <div class="row" style="padding: 0 65px;">
                <div class="" style=" width: auto; border:none;">
                    <table class="table table-hover text-center" style="margin-bottom: 0;">
                        <thead>
                        <tr>
                            <td>时间</td>
                            <td>金额</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <foreach name="lotteryInfo" item="lotteryGot">
                            <if condition="$lotteryGot.isgot eq 1">
                            <tr>
                                <td>{$lotteryGot['time']}</td>
                                <td>{$lotteryGot['level']}</td>
                                <td><div class="btn btn-text" onclick="window.location.href ='{:U('Home/OrderInfo/findOneOrder?orderId='.$lotteryGot['orderinfo_id'])}' ">查看</div></td>
                            </tr>
                            </if>
                        </foreach>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- 拼购券获得历史 end -->
            <br><br><br>
            <!-- 拼购券使用历史 start -->
            <div class="row" style="padding: 25px 65px 0 65px;">
                <div class="col-sm-4 col-lg-4" style="">
                    <h4>拼购券使用历史</h4>
                </div>
            </div>
            <div class="row" style="padding: 0 65px;">
                <div class="" style=" width: auto;">
                    <table class="table table-hover text-center" style="margin-bottom: 0;">
                        <thead>
                        <tr>
                            <td>时间</td>
                            <td>金额</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <foreach name="lotteryInfo" item="lotteryUse">
                            <if condition="$lotteryUse.isgot eq 0">
                                <tr>
                                    <td>{$lotteryUse['time']}</td>
                                    <td>{$lotteryUse['level']}</td>
                                    <td><div class="btn btn-text" onclick="window.location.href ='{:U('Home/OrderInfo/findOneOrder?orderId='.$lotteryUse['orderinfo_id'])}' ">查看</div></td>
                                </tr>
                            </if>
                        </foreach>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- 拼购券使用历史 end -->
        </div>

        <br><br><br>

    <!-- todo:此处的标题框和table的上边框重合处没有 -->
        <div id="luckybag" style="display: none;">
            <!-- 代金券获得历史 start -->
            <div class="row" style="padding: 25px 65px 0 65px;">
                <div class="col-sm-4 col-lg-4">
                    <h4>代金券获得历史</h4>
                </div>
                <div class="col-sm-offset-4 col-lg-offset-4 col-sm-4 col-lg-4 h5">
                    代金券余额：<span style="color: RGB(244,166,36);">{$sumMoney}</span>
                </div><br><br>
            </div>
            <div class="row" style="padding: 0 65px;">
                <div class="" style=" width: auto;">
                    <table class="table table-hover text-center" style="margin-bottom: 0;">
                        <thead>
                        <tr>
                            <td>时间</td>
                            <td>金额</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <foreach name="luckyMoneyInfo" item="moneyGot">
                            <if condition="$moneyGot.isgot eq 1">
                            <tr>
                                <td>{$moneyGot['time']}</td>
                                <td>{$moneyGot['number']}</td>
                                <td><div class="btn btn-text" onclick="window.location.href ='{:U('Home/OrderInfo/findOneOrder?orderId='.$moneyGot['orderinfo_id'])}' ">查看</div></td>
                            </tr>
                            </if>
                        </foreach>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- 代金券获得历史 end -->
            <br><br><br>
            <!-- 代金券使用历史 start -->
            <div class="row" style="padding: 25px 65px 0 65px;">
                <div class="col-sm-4 col-lg-4">
                    <h4>代金券使用历史</h4>
                </div>
            </div>
            <div class="row" style="padding: 0 65px;">
                <div class="" style=" width: auto;">
                    <table class="table table-hover text-center" style="margin-bottom: 0;">
                        <thead>
                        <tr>
                            <td>时间</td>
                            <td>金额</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <foreach name="luckyMoneyInfo" item="moneyUse">
                            <if condition="$moneyUse.isgot eq 0">
                            <tr>
                                <td>{$moneyUse['time']}</td>
                                <td>{$moneyUse['number']}</td>
                                <td><div class="btn btn-text" onclick="window.location.href ='{:U('Home/OrderInfo/findOneOrder?orderId='.$moneyUse['orderinfo_id'])}' ">查看</div></td>
                            </tr>
                            </if>
                        </foreach>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- 代金券使用历史 end -->

        </div>
    </div>
</block>